import http from "@/utils/request";

// 日志模板列表
export function getTemplateList(params) {
  return http({
    url: "/api/dingdinglog/TemplateList",
    method: "get",
    params:params,
  });
}
// 根据用户userid获取可用模板
export function GetTemplateListByUser(params) {
  return http({
    url: "/api/dingdinglog/GetTemplateListByUser",
    method: "get",
    params,
  });
}
// 日志模板信息
export function GetTemplateInfo(params) {
  return http({
    url: "/api/dingdinglog/GetTemplate",
    method: "get",
    params,
  });
}

// 新增日志模板
export function AddTemplate(data) {
  return http({
    url: "/api/dingdinglog/AddTemplate",
    method: "post",
    data,
  });
}
// 编辑日志模板
export function UpdateTemplate(data) {
  return http({
    url: "/api/dingdinglog/UpdateTemplate",
    method: "post",
    data,
  });
}
// 删除日志模板
export function delTemplate(params) {
  return http({
    url: "/api/dingdinglog/DeleteTemplate",
    method: "delete",
    params,
  });
}

// 新增日志记录
export function AddLogRecord(data) {
  return http({
    url: "/api/dingdinglog/AddLogRecord",
    method: "post",
    data,
  });
}
// 编辑日志记录
export function UpdateLogRecord(data) {
  return http({
    url: "/api/dingdinglog/UpdateLogRecord",
    method: "post",
    data,
  });
}
// 日志记录列表
export function GetPageList(params) {
  return http({
    url: "/api/dingdinglog/PageList",
    method: "get",
    params,
  });
}
// 日志信息
export function GetLogRecord(params) {
  return http({
    url: "/api/dingdinglog/GetLogRecord",
    method: "get",
    params,
  });
}
// 修改未读状态
export function UpdateRead(params) {
  return http({
    url: "/api/dingdinglog/UpdateRead",
    method: "get",
    params,
  });
}
// 日志已读未读列表
export function GetReadList(params) {
  return http({
    url: "/api/dingdinglog/ReadList",
    method: "get",
    params,
  });
}
// 日志点赞
export function UpdateGood(params) {
  return http({
    url: "/api/dingdinglog/UpdateGood",
    method: "get",
    params,
  });
}
// 日志点赞列表
export function GetGoodList(params) {
  return http({
    url: "/api/dingdinglog/GoodList",
    method: "get",
    params,
  });
}
// 判断是否已点赞
export function GetGoodFlag(params) {
  return http({
    url: "/api/dingdinglog/GetGood",
    method: "get",
    params,
  });
}
// 日志评论列表
export function GetCommentList(params) {
  return http({
    url: "/api/dingdinglog/CommentList",
    method: "get",
    params,
  });
}
// 新增日志评论
export function AddComment(data) {
  return http({
    url: "/api/dingdinglog/AddComment",
    method: "post",
    data,
  });
}
// 筛选模板列表
export function GetTemplateList(params) {
  return http({
    url: "/api/dingdinglog/GetTemplateList",
    method: "get",
    params,
  });
}
// 是否具有新建模板权限
export function IsManager(params) {
  return http({
    url: "/api/dingdinglog/IsManager",
    method: "get",
    params,
  });
}